#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#define bit 32
/*int calcu(int a)
{
    int i = 1;
    int c = 0, b = 0;
    for (i = 1;i <= bit;i++)
    {
        c = (a < 0 ? 1 : 0);
        a = a << 1;
        if (c == 1)
        {
            b++;
        }
    }
    return b;
}
int main()
{
    int x;
    int y;
    scanf("%d", &x);
    y = calcu(x);
    printf("%d", y);
    return 0;
}

int change(int a, int b)
{
    int x = 0, y = 0;
    int count = 0;
    for (int i = 1;i <= 32;i++)
    {
        x = (a < 0 ? 1 : 0);
        y = (b < 0 ? 1 : 0);
        if (x != y)
        {
            count++;
        }
        a = a << 1;
        b = b<< 1;

    }
    return count;
}
int main()
{
    int a=0, b=0;
    scanf("%d %d", &a, &b);
    int c = change(a, b);
    printf("%d",c);
    return 0;
}
void print1(int a)
{
    int b = 0;
    b = a;
    int x = 0,y=0;
    int i = 1;
     for(i=1;i<=32;i++)
    {
        x = (a < 0 ? 1 : 0);
        if (i % 2 == 1)
        {
            printf("%d", x);
        }
        a = a << 1;
    }
     printf("\n");
     for (i = 1;i <= 32;i++)
     {
         y = (b < 0 ? 1 : 0);
         if (i % 2 == 0)
         {
             printf("%d", y);
         }
         b = b << 1;
     }
}
int main()
{
    int a = 0;
    scanf("%d", &a);
    print1(a);
    return 0;
}*/
/*
void exchange(int arr1[4], int arr2[5], int arr3[10], int a, int b)
{
    for (int x = 0;x < a + b;x++)
    {
        if (x < a)
        {
            arr3[x] = arr1[x];
        }
        else if ((x >= a) && (x < a + b))
        {
            arr3[x] = arr2[x - a];
        }
    }
    for (int y = 1;y < a + b;y++)
    {
        for (int z = 0;z < a + b - y;z++)
        {
            if (arr3[z] > arr3[z + 1])
            {
                int tmp = arr3[z];
                arr3[z] = arr3[z + 1];
                arr3[z + 1] = tmp;
            }
        }
    }


}
int main()
{
    int a, b;
    int arr1[10] = { 0 };
    int arr2[10] = { 0 };
    int arr3[10] = {0};
    scanf("%d %d", &a, &b);
    //printf("\n");
    for (int i = 0;i <= a - 1;i++)
    {
        scanf("%d", &arr1[i]);
    }
   // printf("\n");
    for (int j = 0;j <= b - 1;j++)
    {
        scanf("%d", &arr2[j]);
    }
    printf("\n");
    exchange(arr1, arr2, arr3, a, b);
    for (int s = 0;s < a + b;s++)
    {
        printf("%d ", arr3[s]);
    }

    return 0;
}
int judge(int m, int n)
{
    int day = 0;
    if ((m % 4 == 0) && ((m % 100 != 0) || (m % 400 == 0)))
    {
        if ((n % 2 == 1 || n == 8 || n == 10 || n == 12) && (n != 9))
            day = 31;
        else if (((n % 2 == 0) && (n != 2 && n != 8 && n != 12)) || n == 9)
            day = 30;
        else if (n == 2)
            day = 29;
    }
    else
    {
        if ((n % 2 == 1 || n == 8 || n == 10 || n == 12) && (n != 9))
            day = 31;
        else if (((n % 2 == 0) && (n != 2 && n != 8 && n != 12)) || n == 9)
            day = 30;
        else if (n == 2)
            day = 28;
    }
    return day;
}
int main()
{
    int x = 0;
    int year = 0, month = 0;
    while (scanf("%d%d ", &year, &month) != EOF)
    {
        scanf("%d%d", &year, &month);
        x = judge(year, month);
        printf("%d", x);
    }
    return 0;
}*/
